//把路由相关的内容抽离到这里，然后输出到index.js,可以让结构变得清晰
//2,导入 vue-router 包,这个路由包必须导入，并且在index.js中也要导入进去
import  VueRouter from 'vue-router'
//3,引入路由的vue对象
import home from './vue-components/tabbar/Home.vue'
import message from './vue-components/tabbar/Mesage.vue'
import search from './vue-components/tabbar/Search.vue'
import setting from './vue-components/tabbar/Setting.vue'
import shopcar from './vue-components/tabbar/Shopcar.vue'
import newslist from './vue-components/news/NewsList.vue'
import newsinfo from './vue-components/news/NewsInfo.vue'
import photolist from './vue-components/photos/photolist1.vue'
import photoinfo from './vue-components/photos/photoinfo.vue'
import goodslist from './vue-components/goods/GoodsList.vue'

//4，新建vuerouter对象
var router=new VueRouter({
  routes:[
    {path:'/',redirect:'/home'},
    {path:'/home',component:home},
    {path:'/message',component:message},
    {path:'/search',component:search},
    {path:'/setting',component:setting},
    {path:'/shopcar',component:shopcar},
    {path:'/home/newslist',component:newslist},
    {path:'/home/newsinfo/:id/:add_time/:count/:title',component:newsinfo},
    {path:'/home/photolist',component:photolist},
    {path:'/home/photoinfo/:id/:title',component:photoinfo},
    {path:'/home/goodslist',component:goodslist},

  ],
  linkActiveClass:'mui-active'
})
//5，输出router对象
export default router